<?php

session_start();

if (!isset($_SESSION['userID'])) {
    header('Location: index.php');
} else {
    unset($_SESSION['userID']);
    session_destroy();
    header('Location: index.php');
}

?>
